source comm.cfg

ssh ${BACKEND01} "if [ ! -d '${INSTALLDIR}' ]; then mkdir -p '${INSTALLDIR}'; fi"
ssh ${BACKEND02} "if [ ! -d '${INSTALLDIR}' ]; then mkdir -p '${INSTALLDIR}'; fi"

scp comm.cfg haproxy.cfg keepalived.conf ${BACKEND01}:${INSTALLDIR}
scp comm.cfg haproxy.cfg keepalived.conf ${BACKEND02}:${INSTALLDIR}

nohup ssh ${BACKEND01} "cd ${INSTALLDIR} && bash -s" < install.sh > ${BACKEND01}-hkd.log 2>&1 &
nohup ssh ${BACKEND02} "cd ${INSTALLDIR} && bash -s" < install.sh > ${BACKEND02}-hkd.log 2>&1 &